<script type="text/javascript">

 var fmfrmcharttimerent_cal1 = CreateCalObject('fmfrmcharttimerent_fromdate', 'fmfrmcharttimerent_imgCal1');
var fmfrmcharttimerent_cal2 = CreateCalObject('fmfrmcharttimerent_todate', 'fmfrmcharttimerent_imgCal2');

function fmfrmcharttimerent_createChart(){
    if(!checkDate('fmfrmcharttimerent_fromdate','fmfrmcharttimerent_todate',90)){
    return false;
    } 
     charttype = $("input[name='fmfrmcharttimerent_charttype']:checked").val();
     fromdate = ConvertoDateEN($('#fmfrmcharttimerent_fromdate').val());
     todate = ConvertoDateEN($('#fmfrmcharttimerent_todate').val());
     //alert(fromdate);
     //changeWaiting(0);
     xajax_fmfrmcharttimerent_viewchart(charttype,fromdate,todate);  
}

$('#fmfrmcharttimerent_fromdate').val(GetCurrentDateTime(0,1,false,0)) ;
$('#fmfrmcharttimerent_todate').val(GetCurrentDateTime(0,0,false,0)) ;

$(document).ready(function () {
    initDivleft();
    initForm('fmfrmcharttimerent_tblinfo'); 
$('#fmfrmcharttimerent_productDetail').dialog({
        autoOpen: false,
        modal: false,
        width: 400,
        resizable: true,
        overflow: 'auto' 
    });
});
//changeWaiting(0);
xajax_fmfrmcharttimerent_viewchart();
var data_fmcharttimerent ; 
function open_flash_chart_data_fmcharttimerent()    // bieu do nhien lieu chÆ°a xu ly
{
   // alert(data_chartincomebymonth);
    return JSON.stringify(data_fmcharttimerent);
}

    </script>

<body>
<div class="divmain">
<table width="100%" id="fmfrmcharttimerent_tblinfo" class="tblInfo">
<tr>
<td valign="top" class="width25">
<div> 

<table class="info" id="fmfrmcharttimerent_info">
<tr> 
<td>
<div id="fmfrmcharttimerent_divleft" class="divleft"> 
<table class="width100 tbltranparents">               
       <tr>
         <td align="right" class="width30 lblRequired"><b>Thời gian:</b></td>
         <td> <input type="text" value="" class="datereport txtRequired" onblur="formatddmmyyyy(this)" maxlength="10"  id="fmfrmcharttimerent_fromdate"/><a href="javascript:fmfrmcharttimerent_cal1.popup();"><img src="adagps.com/images/cal/cal2.png" id="imgfmfrmcharttimerent_cal1"  class="datepicker dpkstart" ></a>-<input class="datereport txtRequired" onblur="formatddmmyyyy(this)" maxlength="10" type="text" value=""  id="fmfrmcharttimerent_todate" /><a href="javascript:fmfrmcharttimerent_cal2.popup();"><img src="adagps.com/images/cal/cal2.png" id="imgfmfrmcharttimerent_cal2"   class="datepicker dpkend" ></a> </td>
       </tr>
       <tr>
         <td align="right" class="width30" rowspan="4"><b>Loại biểu đồ:</b></td>
         <td><input type="radio" checked="checked" name="fmfrmcharttimerent_charttype" id="fmfrmcharttimerent_charttype_1" value="1">Thời gian theo ngày  </input></td>
       </tr>
      <tr>
         <td align="right"><input type="radio"  name="fmfrmcharttimerent_charttype" id="fmfrmcharttimerent_charttype_2" value="2">Thời gian theo bàn</input> </td>
       </tr>       
       <tr>
         <td align="right"> <input type="radio"  name="fmfrmcharttimerent_charttype" id="fmfrmcharttimerent_charttype_3" value="3">Bình quân theo các ngày trong trong tuần</input> </td>
       </tr>       
<!--       <tr>
         <td align="right"> <input type="radio"  name="fmfrmchartgeneral_charttype" id="fmfrmchartgeneral_charttype_4" value="4">BÃ¬nh quÃ¢n theo ngÃ y trong tuáº§n</input> </td>
       </tr>-->                 
</table>

    <div class="divactionbuton">
        <button id="fmfrmcharttimerent_create" class="search1" onclick="fmfrmcharttimerent_createChart();" type="button" > Xem </button>
        </div>
</div>
</td>
</tr>    
       
<tr>
<td>


</td>
</tr>
</table>
</div>
</td>
<td class="clsmiddle"></td>
<td height="400" class="clschart" align="center" valign="middle">
<div class="divGrid" id="fmfrmcharttimerent_divGrid">

</div></td>
<!--<td class="clsend"></td>-->
</tr>
</table>
</div>

</body>
